#pragma once

#include <SFML/Audio/SoundStream.hpp>

class SoundBank;
class VocoderController;
class VocoderModel;
class ModulatorStream;
class ModulatorThread;
class CarrierStream;
class VocoderStream;
class SampleBuffer;
class SampleBuffer2;
class VocoderThread;
class PitchTracker;
class ModulatorTextProvider;
class Recorder;
class Settings;
class SettingsProvider;

class Locator
{
public:
	Locator(void);
	~Locator(void);

	static Locator* Instance();

	void Cleanup();

	SoundBank* GetSoundBank();
	void SetSoundBank(SoundBank* s);

	VocoderController* GetController();
	void SetController(VocoderController* c);

	SettingsProvider* GetSettingsProvider();
	void SetSettingsProvider(SettingsProvider* settingsProvider);

	void SetModulatorStream(ModulatorStream* modulatorStream);
	ModulatorStream* GetModulatorStream();

	void SetModulatorBuffer(SampleBuffer2* sampleBuffer);
	SampleBuffer2* GetModulatorBuffer();

	void SetModulatorThread(ModulatorThread* modulatorThread);
	ModulatorThread* GetModulatorThread();

	void SetCarrierStream(CarrierStream* carrierStream);
	CarrierStream* GetCarrierStream();

	void SetVocoderStream(VocoderStream* vocoderStream);
	VocoderStream* GetVocoderStream();

	void SetVocoderBuffer(SampleBuffer* sampleBuffer);
	SampleBuffer* GetVocoderBuffer();

	void SetVocoderThread(VocoderThread* vocoderThread);
	VocoderThread* GetVocoderThread();

	void SetOutputStream(sf::SoundStream* outputStream);
	sf::SoundStream* GetOutputStream();

	void SetPitchTracker(PitchTracker* w);
	PitchTracker* GetPitchTracker();

	void SetModulatorTextProvider(ModulatorTextProvider* textProvider);
	ModulatorTextProvider* GetModulatorTextProvider();

	void SetRecorder(Recorder* recorder);
	Recorder* GetRecorder();

	void SetSettings(Settings* settings);
	Settings* GetSettings();
protected:
	SoundBank* soundBank;
	VocoderController* controller;
	ModulatorStream* modulatorStream;
	SampleBuffer2* modulatorBuffer;
	ModulatorThread* modulatorThread;
	CarrierStream* carrierStream;
	VocoderStream* vocoderStream;
	SampleBuffer* vocoderBuffer;
	VocoderThread* vocoderThread;
	sf::SoundStream* outputStream;
	PitchTracker* pitchTracker;
	ModulatorTextProvider* textProvider;
	Recorder* recorder;
	Settings* settings;
	SettingsProvider* settingsProvider;
};
